

struct Node
{
	string line; //char []
	int curr;
	Node *next;
	Node():curr(0),next(nullptr)
	{}
};
#include <string>
#include <algorithm>
#include <array>
int main()
{

	Node *head = new Node();
	vector<Node *> vecnode;  // after while    erase the first elemet
	while (1)
	{
		string str;
		getline(cin,str);
		//std::cin>>str;  // here wil ignore the  \t
		auto itr = str.begin();
		int count = 0;
		while (itr != str.end() && (*itr) == '\t')
		{
			itr=str.erase(itr);
			count++;
		}
		if (count == 0)
		{
			vecnode.push_back(head);
			head = new Node;	
			head->line.resize(str.size());
			copy(itr, str.end(), head->line.begin());
		}
		else
		{
			Node *prenode = head;
			count = count - 1;
			while (count && prenode)
			{
				prenode = prenode->next;
				count--;
			}
			if (prenode == nullptr) 
            {
                cout << "error line"; //改行没有连续的 data 中间有断链
                continue;
            }
            if (prenode->next == nullptr)
			{
				Node *curr = new Node();
				curr->line.resize(str.size());
				copy(itr, str.end(), curr->line.begin());
				prenode->next = curr;
			}
			else
			{
				prenode->next->line = prenode->next->line + str;
			}
		}
	}
}